/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.objectsearch.connection;

import java.sql.SQLException;

/**
 * this is the implementation to the database connection, it gives the
 * implementation methods to the database connection
 * 
 * @author Carlos
 */
public interface ConnectionInterface {

	/**
	 * it is the method that must implement opening the database Connection
	 * 
	 * @throws java.lang.Exception
	 *             if the connection could not be opened
	 */
	public void open() throws Exception;

	/**
	 * closes the the current database Connection
	 * 
	 * @throws java.sql.SQLException
	 *             is thrown if the database could not be closed
	 */
	public void close() throws SQLException;

	/**
	 * returns the current connection to the database
	 * 
	 * @return get the connection to the database
	 */
	public java.sql.Connection getConnection();

}
